package com.cloudbroker.bcs.common.mq.rabbitmq.basic;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import com.alibaba.fastjson.JSONObject;

@Component
public class PojoConsumer {
    
    private static final Logger LOGGER = LoggerFactory.getLogger(PojoConsumer.class);
    
    public PojoConsumer() {
    }
    
    public void rev(String msg) {
        LOGGER.info("rev msg: " + msg);
    }
    
    @RabbitListener(queues = { "queue_test_json" }, containerFactory = "listenerContainerFactory")
    public void annRev(JSONObject msg) {
        LOGGER.info("annRev msg: " + msg);
    }
    
}
